package bpmn.camunda.config;

import bpmn.camunda.plugin.ProgressLoggingSupportParseListenerPlugin;
import org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin;
import org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;

@Configuration
public class StandaloneInMemProcessEngineConfigurationConvertConfig {



    @Bean
    public StandaloneInMemProcessEngineConfiguration standaloneInMemProcessEngineConfiguration(){
        StandaloneInMemProcessEngineConfiguration standaloneInMemProcessEngineConfiguration = new StandaloneInMemProcessEngineConfiguration();


        ArrayList<ProcessEnginePlugin> processEnginePlugins = new ArrayList<>();
        processEnginePlugins.add(new ProgressLoggingSupportParseListenerPlugin());
        standaloneInMemProcessEngineConfiguration.setProcessEnginePlugins(processEnginePlugins);


        return standaloneInMemProcessEngineConfiguration;
    }

}
